﻿#1.可变长参数
# def getcomputer(*args):#带星号是可变长参数
#     print(args)
#     result=0
#     for item in args:
#         result+=item
#     print('相加结果为%d'%result)
#     pass
# getcomputer(1,2,3,4,5,6)#输出的是元组数据
# getcomputer(1)
#2.关键字参数
def keyfunc(**kwargs):
    print(kwargs)
    pass
# keyfunc(name='peter',age=18)#输出为字典数据
dictA={'name':'xiaowen','age':17}
keyfunc(**dictA)
